package day1009_2;

import java.util.Objects;

public class Employee {
    private String no;
    private String name;

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Employee employee = (Employee) o;
        return Objects.equals(no, employee.no) && Objects.equals(name, employee.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(no, name);
    }

    public Employee() {
    }

    public Employee(String no, String name) {
        this.no = no;
        this.name = name;
    }
}
